package org.xxpay.pay.channel.zealchin;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.Assert;
import org.xxpay.common.unify.AbstractPaymentConfig;

public class ZealchinConfig extends AbstractPaymentConfig {
    public static final String CHANNEL_NAME = "zealchin";
    public static final String CHANNEL_NAME_ZEALCHIN_ALIPAY = CHANNEL_NAME + "_alipay";

    public static final String REQ_PAY_URL_FIXX = "/p_order/create";//支付后缀
    public static final String REQ_PAY_QUERY_URL_FIXX = "/p_order/query";//支付订单查询接口
    ZealchinConfig(String payParam){
        Assert.notNull(payParam, "init quanmin config error");
        JSONObject object = JSON.parseObject(payParam);
        setAppId(object.getString("appId"));
        setPrivateKey(object.getString("privateKey"));
        setRequestUrl(object.getString("requestUrl"));
        setPayMode(object.getString("payType"));
    }
}
